import { get, fnChoose, lsGetStr, fnUpload, post } from '../../utils/request.js';
var { getLoginedUser, fnLoading, fnHideLoading, fnSuccess, fnFail } = require('../../utils/index');
var WxParse = require('../wxParse/wxParse.js');
// pages/knowledge/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let that = this;
    fnLoading('加载中');
    get({
      path: '/info/detail/999',
    })
      .then(function (data) {
        fnHideLoading();
        WxParse.wxParse('detailHtml', 'html', data.content, that, 5);
        wx.setNavigationBarTitle({
          title: data.title,
        })
        that.setData({
          title: data.title
        })
      })
      .catch(function () {
        fnHideLoading();
        fnFail('请求错误，请稍后重试~')
      })
  },

})